const express = require("express");
const router = express.Router();
const db = require('../../db/index');
router.get('/getInfo', (req, res) => {

    const sql = 'select * from user';

    db.query(sql, (err, data) => {
        if (err) { err; };
        if (data.length < 1) {
            res.send({ code: 0, msg: '获取用户信息失败' });
        }
     
        res.send({ code: 200, data: data, msg: '获取用户信息成功' });
    });
});
module.exports = router;